﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin.Master" AutoEventWireup="true" CodeBehind="ProductDetail.aspx.cs" Inherits="Dac.Admin.ProductDetail" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <script type="text/javascript">
        $(function () {
            InitEditor();
        });

        function InitEditor() {
            CKEDITOR.replace('<%=txtProductDescEn.ClientID %>', {
                allowedContent: true,
                htmlEncodeOutput: true,
                toolbarCanCollapse: true,
                resize_enabled: false,
                width: 800,
                height: 350
            });
            CKEDITOR.replace('<%=txtProductDescRu.ClientID %>', {
                allowedContent: true,
                htmlEncodeOutput: true,
                toolbarCanCollapse: true,
                resize_enabled: false,
                width: 800,
                height: 350
            });
            CKFinder.setupCKEditor(null, '<%=ResolveClientUrl("~") %>ckfinder/');
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div class="page_header">
        <h2><img src="<%=ResolveClientUrl("~") %>images/design/dashboard_icon.png" alt="" title="" /> <asp:Label runat="server" ID="lblTitle"/></h2>
        <div class="fieldset_cotent form-horizontal">
            <div class="row">
                <div class="col-lg-12">                                    
                    <div class="form-group">
                    <label class="col-lg-3 control-label">Название (рус.)</label>
                    <div class="col-lg-9">
                        <asp:TextBox CssClass="form-control" placeholder="Название товара (рус.)" ID="txtProductNameRu" ValidationGroup="newItem" runat="server" TabIndex="1" />
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator4" ControlToValidate="txtProductNameRu" runat="server" Text="*" ValidationGroup="newItem" ForeColor="Red" />
                    </div>
                    </div>
                    <div class="form-group">
                    <label class="col-lg-3 control-label">Название (англ.)</label>
                    <div class="col-lg-9">
                        <asp:TextBox CssClass="form-control" placeholder="Название товара (англ.)" ID="txtProductNameEn" ValidationGroup="newItem" runat="server" TabIndex="2" />
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" ControlToValidate="txtProductNameEn" runat="server" Text="*" ValidationGroup="newItem" ForeColor="Red" />
                    </div>
                    </div>
                    <div class="form-group">
                    <label class="col-lg-3 control-label">Описание (рус.)</label>
                    <div class="col-lg-9">
                        <asp:TextBox CssClass="form-control" placeholder="Описание товара (рус.)" ID="txtProductDescRu" ValidationGroup="newItem" runat="server" TabIndex="3" TextMode="MultiLine" />
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" ControlToValidate="txtProductNameRu" runat="server" Text="*" ValidationGroup="newItem" ForeColor="Red" />
                    </div>
                    </div>
                    <div class="form-group">
                    <label class="col-lg-3 control-label">Описание (англ.)</label>
                    <div class="col-lg-9">
                        <asp:TextBox CssClass="form-control" placeholder="Описание товара (англ.)" ID="txtProductDescEn" ValidationGroup="newItem" runat="server" TabIndex="4" TextMode="MultiLine" />
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator3" ControlToValidate="txtProductNameEn" runat="server" Text="*" ValidationGroup="newItem" ForeColor="Red" />
                    </div>
                    </div>
                    <div class="form-group">
                    <label class="col-lg-3 control-label">Цена</label>
                    <div class="col-lg-3">
                        <asp:TextBox CssClass="form-control" placeholder="Цена $" ID="txtPrice" ValidationGroup="newItem" runat="server" TabIndex="5" />
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator5" ControlToValidate="txtPrice" runat="server" Text="*" ValidationGroup="newItem" ForeColor="Red" />
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator2" Display="Dynamic" ValidationExpression="^[0-9]{1,7}$" ValidationGroup="newItem" ControlToValidate="txtPrice" runat="server" Text="Требуется целое число" ForeColor="Red" />
                    </div>
                    <div class="col-lg-6">
                        <asp:CheckBox style="margin-left:30px" ID="chkIsShow" runat="server" Text="Показывать" />
                        <asp:CheckBox style="margin-left:30px" ID="chkOutStock" runat="server" Text="Нет в наличии" />
                    </div>
                    </div>

                    <div class="form-group">
                        <label class="col-lg-3 control-label">Изображения</label>
                        <div class="col-lg-4">
                            <label class="col-lg-3 control-label">Предпросмотр</label><br /><br />
                            <asp:Image runat="server" ID="imgPreviewImage" style="max-width:300px;" /><br /><br />
                            <asp:FileUpload runat="server" ID="fuPreviewImage" />
                        </div>
                        <div class="col-lg-5">
                            <label class="col-lg-3 control-label">Основное</label><br /><br />
                            <asp:Image runat="server" ID="imgMainImage" style="max-width:300px;"/><br /><br />
                            <asp:FileUpload runat="server" ID="fuMainImage" />
                        </div>
                    </div>
                    
                </div>
            </div>
            <div class="button_group">
                <asp:Button CssClass="btn btn-success" ID="btnSave"  ValidationGroup="newItem" Text="Сохранить" runat="server" OnClick="btnSave_Click" />
                <a class="btn btn-info" href="ProductList.aspx">Назад</a>
            </div> 
        </div>
    </div>
</asp:Content>
